package Flyweight_Pattern.Network;

// -*-coding:utf-8 -*-
//人员：刘陆鑫
//班级：19软3
//学号；2019110218
public class client {
    public static void main(String[] args) {
        Network computer1,computer2,computer3,computer4;
        Network_Factory factory;

        factory=Network_Factory.getInstance();

        computer1= factory.getNetwork("s");
        computer2= factory.getNetwork("s");
        computer3= factory.getNetwork("h");
        computer4= factory.getNetwork("h");
        computer1.link(new Port(25));
        computer2.link(new Port(26));
        computer3.link(new Port(41));
        computer4.link(new Port(42));
    }
}
